package com.xfsong.demo.service;
import com.xfsong.demo.entity.Category;

import java.util.List;

public interface CategoryService {
    int insertCategory(Category category);
    int deleteCategoryById(Integer id);
    int updateCategory(Category category);
    Category selectCategoryById(Integer id);
    List<Category> selectAllCategories();

    boolean isCategoryNameExists(String categoryName);

    boolean canDeleteCategory(Integer id);

    Category selectCategoryByName(String categoryName);

    List<Category> selectCategoriesByPageAndName(int page, int pageSize, String categoryName);
    int countCategoriesByName(String categoryName);
}
